/**
 * 活动管理
 */
import request from '/@/utils/request';

export function readAllActivityItem(params?: any) {
  return request({
    url: 'activity-items',
    method: 'get',
    params,
  });
}

export function readOneActivityItem(id: string) {
  return request({
    url: `activity-items/${id}`,
    method: 'get',
  });
}

export function createActivityItem(data: any) {
  return request({
    url: 'activity-items',
    method: 'post',
    data,
  });
}

export function updateActivityItem(id: string, data: any) {
  return request({
    url: `activity-items/${id}`,
    method: 'patch',
    data,
  });
}

export function deleteActivityItem(id: string) {
  return request({
    url: `activity-items/${id}`,
    method: 'delete',
  });
}
